package yf.platform.bo;

public interface BizResult {

	/**
	 * 直接输出
	 */
	public final static byte ECHO = 1;
	
	/**
	 * 服务器内部跳转
	 * 保存REQUEST对象
	 */
	public final static byte REDIRECT = 2;
	
	/**
	 * 客户端掉转
	 * 不保存REQUEST对象
	 */
	public final static byte JUMP = 3;
	
	public String getMsg();
	
	public BizResult setMsg(String msg);
	
	public int getCode();
	
	public BizResult setCode(int code);
	
	public String getPage();
	
	public BizResult setPage(String page);
	
	public <T> T getData();
	
	public <T> BizResult setData(T data);
	
	public byte getType();
	
	public BizResult setType(byte t);
	
	public BizResult setReqAttribute(String k, Object v);
	
	public BizResult setSissAttribute(String k, Object v);
	
	public BizResult setAppAttribute(String k, Object v);
	
	public <T> T getReqAttribute(String k);
	
	public <T> T getSissAttribute(String k);
	
	public <T> T getAppAttribute(String k);
	
	public BizResult removeReqAttribute(String k);
	
	public BizResult removeSissAttribute(String k);
	
	public String toString();
	
}
